package cn.edu.njnu.opengmpback.Modeling.entity;

import cn.hutool.core.util.IdUtil;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.Date;

@Data
@Document
public class LogicMaterial {
    @Id
    @ApiModelProperty(value = "id", hidden = true)
    String id = IdUtil.objectId();

    private String name;
    private String description;
    private boolean publicBoolean = true;

    String creatorId;
    String creatorName;
    String creatorEmail;

    String materialStoreName;
    String materialWebAddress;
    String materialRelativePath;

    @ApiModelProperty(value="创建时间", hidden = true)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    Date createTime=new Date(); //创建时间

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    Date updateTime=new Date(); //创建时间
}
